create or replace function statusCall(integer, text) 
returns xml as
$$
  declare
  pCode alias for $1;
  pMessageText alias for $2;
  begin
    return xmlElement( name callStatus, 
		       xmlElement ( name statusCode, pCode),
		       xmlElement ( name statusMessage, pMessageText)
		      );
  end;
$$ language plpgsql immutable